#!/bin/bash

set -e
sudo -v

# EII GUI settings
export EII_GUI_HOME=

# EIIMessageBus dynamic lib path settings
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/eii/lib
export PYTHONPATH=$PYTHONPATH:/usr/lib/python3.8/site-packages

# Genicam and gstreamer settings
export GENICAM_GENTL64_PATH=/opt/mvIMPACT_Acquire/lib/x86_64
export GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0:$GST_PLUGIN_PATH

# Virtual Env Setting
WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /usr/local/bin/virtualenvwrapper.sh

# Start eii deploy tool
echo "EII GUI starting..."
cd $EII_GUI_HOME
workon eiigui-env && cd ./src && python3 main.py
